package com.my.test.design.strategy;

public enum PayEnum {

    // RMB EXTENDS PayEnum
    RMB(new StrategyRMB()),

    DOLLAR(new StrategyDOLLAR());

    private Strategy strategy;

    // 构造方法里传入策略对象实例
    PayEnum(Strategy strategy) {
        this.strategy = strategy;
    }

    public Strategy getStrategy() {
        return strategy;
    }


    public void setStrategy(Strategy strategy) {
        this.strategy = strategy;
    }


}
